package com.example.sneakerappserver.repository;

import com.example.sneakerappserver.pojo.Cart;
import com.example.sneakerappserver.pojo.Category;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface CategoryRepository extends CrudRepository<Category,Long> {

    @Query(value = "SELECT * FROM tb_category WHERE category_id=:categoryId",nativeQuery = true)
    Category findByCategoryId(Long categoryId);
}
